package com.learner.config;

import java.util.HashMap;
import java.util.Map;

/**
 * @Auther: qho
 * @Date: 2018/10/15 00:07
 * @Description:
 */
public class Msg {

    private Boolean success;

    private String errorInfo;

    public Boolean getSuccess() {
        return success;
    }

    public void setSuccess(Boolean success) {
        this.success = success;
    }

    public String getErrorInfo() {
        return errorInfo;
    }

    public void setErrorInfo(String errorInfo) {
        this.errorInfo = errorInfo;
    }


    public static Msg success(){
        Msg result = new Msg();
        result.setSuccess(true);
        return result;
    }

    public static Msg failure(String message){
        Msg result = new Msg();
        result.setSuccess(false);
        result.setErrorInfo(message);
        return result;
    }

}
